package com.sxkf.template.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sxkf.template.vo.response.cart.QueryUserCartVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@ApiModel(description = "t_store")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "t_store")
public class Store {

    /**
     * 店铺ID
     */
    @TableId(value = "id")
    @ApiModelProperty(value = "店铺ID")
    private String id;


    @ApiModelProperty("用户id")
    @TableField("user_id")
    private String userId;

    /**
     * 店铺名称
     */
    @TableField(value = "`name`")
    @ApiModelProperty(value = "店铺名称")
    private String name;
    /**
     * 店铺分类
     */
    @TableField(value = "category_id")
    @ApiModelProperty(value = "店铺分类")
    private String categoryId;

    /**
     * 店铺类型 0线上，1线下，2批发商
     * 现在用  1=批发市场、2=线上店铺、3=实体店铺
     */
    @TableField(value = "`type`")
    @ApiModelProperty(value = "店铺类型 (1=批发市场、2=线上店铺、3=实体店铺)")
    private String type;
    /**
     * 店铺描述
     */
    @TableField(value = "description")
    @ApiModelProperty(value = "店铺描述")
    private String description;

    /**
     * 店铺电话
     */
    @TableField(value = "phone")
    @ApiModelProperty(value = "店铺电话")
    private String phone;

    /**
     * 店铺状态 0待营业，1营业中，2停业
     */
    @TableField(value = "`status`")
    @ApiModelProperty(value = "店铺状态 0待营业，1营业中，2停业")
    private String status;

    /**
     * 认证状态 0未认证 1已认证
     */
    @TableField(value = "is_auth")
    @ApiModelProperty(value = "认证状态 0未认证 1已认证")
    private String isAuth;

    /**
     * 开店日期
     */
    @TableField(value = "opening_date")
    @ApiModelProperty(value = "开店日期")
    private Date openingDate;

    /**
     * 上班时间
     */
    @TableField(value = "start_hours")
    @ApiModelProperty(value = "上班时间")
    private String startHours;

    /**
     * 下班时间
     */
    @TableField(value = "end_hours")
    @ApiModelProperty(value = "下班时间")
    private String endHours;

    /**
     * 公司简介
     */
    @TableField(value = "store_intro")
    @ApiModelProperty(value = "公司简介")
    private String storeIntro;

    /**
     * 粉丝数
     */
    @TableField(value = "fans_count")
    @ApiModelProperty(value = "粉丝数")
    private Integer fansCount;

    /**
     * 店铺头像
     */
    @TableField(value = "avatar")
    @ApiModelProperty(value = "店铺头像")
    private String avatar;

    /**
     * 店铺图片
     */
    @TableField(value = "store_image")
    @ApiModelProperty(value = "店铺图片")
    private String storeImage;

    /**
     * 店铺二维码
     */
    @TableField(value = "qr_code")
    @ApiModelProperty(value = "店铺二维码")
    private String qrCode;

    /**
     * 店铺地理位置 (纬度)
     */
    @TableField(value = "latitude")
    @ApiModelProperty(value = "店铺地理位置 (纬度)")
    private Double latitude;

    /**
     * 店铺地理位置 (经度)
     */
    @TableField(value = "longitude")
    @ApiModelProperty(value = "店铺地理位置 (经度)")
    private Double longitude;

    /**
     * 公司地址
     */
    @TableField(value = "store_address")
    @ApiModelProperty(value = "店铺地址")
    private String storeAddress;

    /**
     * 综合评价
     */
    @TableField(value = "avg_evalution")
    @ApiModelProperty(value = "综合评价")
    private Double avgEvalution;

    /**
     * 用户评价
     */
    @TableField(value = "user_evalution")
    @ApiModelProperty(value = "用户评价")
    private Double userEvalution;

    /**
     * 售后评价
     */
    @TableField(value = "sold_evalution")
    @ApiModelProperty(value = "售后评价")
    private Double soldEvalution;

    /**
     * 公司名称
     */
    @TableField(value = "company_name")
    @ApiModelProperty(value = "公司名称")
    private String companyName;

    /**
     * 公司地址
     */
    @TableField(value = "company_address")
    @ApiModelProperty(value = "公司地址")
    private String companyAddress;

    /**
     * 店铺资历，存富文本信息
     */
    @TableField(value = "`qualify`")
    @ApiModelProperty(value = "店铺资历，存富文本信息")
    private String qualify;

    @ApiModelProperty("账户余额")
    private BigDecimal amount;

    @ApiModelProperty(value = "抽成比例")
    private Double rate;

    /**
     * 运费
     */
    @TableField(value = "freight")
    @ApiModelProperty(value = "运费")
    private BigDecimal freight;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间",hidden = true)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "修改时间",hidden = true)
    private Date updatedTime;

    /*---------------------附加字段------------------------------*/

    @TableField(exist = false)
    @ApiModelProperty(value = "商品信息")
    private List<Product> productList;

    @TableField(exist = false)
    @ApiModelProperty(value = "优惠卷信息")
    private List<Coupon> CouponList;


    @ApiModelProperty(value = "与用户的距离")
    @TableField(exist = false)
    private Double distance;

    @ApiModelProperty(value = "购物车中的商品信息")
    @TableField(exist = false)
    private List<QueryUserCartVO> queryUserCartVOS;

    @TableField(exist = false)
    @ApiModelProperty(value = "关注时间")
    private Date likeTime;

}
